﻿using System.Collections.Generic;
using DataAccess.Services.Interfaces;
using DataControl;
using NHibernate;

namespace DataAccess.Services.Gateways
{
	internal class CurrencyConversionGateway : GatewayBase<Cur_exchange>, ICurrencyConversionGateway
	{
		public CurrencyConversionGateway(ISession session) : base(session)
		{
		}

		public decimal? GetForCurrencies(string currencyCode1, string currencyCode2)
		{
			return DataControl.GetCurrencyConversion(currencyCode1, currencyCode2);
		}

		public IEnumerable<Cur_exchange> GetAll()
		{
			return DataControl.GetAllItems<Cur_exchange>();
		}
	}
}
